home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1997 December
/
MACPOWER-1997-12.ISO.7z
/
MACPOWER-1997-12.ISO
/
AMUG
/
PROGRAMMING
/
Raven 1.2 Examples.sit
/
Raven 1.2 Examples
/
Quill
/
Source
/
ValidatorEditor.h
< prev
next >
Wrap
Text File
|
1997-07-27
|
2KB
|
90 lines
/*
* File: ValidatorEditor.h
* Summary: A view that knows how to edit a TTextBox's validator.
* Written by: Jesse Jones
*
* Copyright ゥ 1996 Jesse Jones.
* For conditions of distribution and use, see copyright notice in ZTypes.h
*
* Change History (most recent first):
*
* <-> 11/30/96 JDJ Created
*/
#pragma once
#include <ZControl.h>
#include <ZListener.h>
#include <ZTextBox.h>
#include "BasePaneEditor.h"
//-----------------------------------
// Forward References
//
class TTextBox;
class TTextValidator;
// ===================================================================================
// CValidatorEditor
// ===================================================================================
class CValidatorEditor : public CRootPaneEditor, public MListener<SControlMessage> {
typedef CRootPaneEditor Inherited;
//-----------------------------------
// Initialization/Destruction
//
public:
virtual ~CValidatorEditor();
CValidatorEditor(TView* superView);
//-----------------------------------
// CBaseEditor API
//
public:
virtual void SetPane(TPane* pane);
virtual bool Validate();
virtual void Apply();
virtual void Commit(TMultipleUndoableCommand* command);
virtual void Revert();
//-----------------------------------
// MListener API
//
protected:
virtual void OnBroadcast(const SControlMessage& mesg);
//-----------------------------------
// TReanimator Support
//
public:
static MReanimatable* Create(MReanimatable* parent);
//-----------------------------------
// Internal API
//
protected:
TTextValidatorPtr GetEditorInfo() const;
void SetEditorInfo(TTextValidatorPtr info);
void SetPaneInfo(TTextValidatorPtr info);
//-----------------------------------
// Member data
//
protected:
TTextBox* mPane;
TTextValidatorPtr mOldInfo;
};